package cn.funclab.elevator.controller;

import cn.funclab.elevator.model.AllElevatorDTO;
import cn.funclab.elevator.model.AllWantGoDTO;
import cn.funclab.elevator.model.DecisionDTO;
import cn.funclab.elevator.service.OperatorService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/Operator")
public class OperatorController {

    @Autowired
    private OperatorService operatorService;


    @ApiOperation("获取电梯的决策信息")
    @PostMapping(value = "/getDecision")
    public DecisionDTO getDicision(@RequestBody AllWantGoDTO allWantGoDTO, AllElevatorDTO allElevatorDTO) {
        return operatorService.getDicision(allWantGoDTO, allElevatorDTO);
    }
}
